﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ListOutStorage.aspx.cs"
    Inherits="dzs.Web.Outstorage.ListOutStorage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../Style.css" rel="stylesheet" />
    <link href="../css/myStyle.css" rel="stylesheet" />
    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../Scripts/JsTools.js" type="text/javascript"></script>
    <style type="text/css">
        td
        {
            font-size: 9pt;
        }
        a
        {
            color: Blue;
            text-decoration: none;
        }
        body
        {
            font-size: 9pt;
        }
    </style>
     <link href="../../jquery-ui.min.css" rel="stylesheet" />
    <script src="../../js/jquery.js"></script>
    <script src="../../js/jquery-ui.min.js"></script>
     <script type="text/javascript">
         $(function () {
             $("#txt_proName").autocomplete({
                 minLength: 1, // 设置搜索的关键字最小长度// 设置自动完成列表的函数，函数包括两个参数，requset和response      
                 source: function (request, response) {
                     $.ajax({
                         type: "POST",          // 通过request.term可以获得文本框内容   
                         url: "../../Handler.ashx?keyword=" + request.term,
                         contentType: "application/json; charset=gb2312",
                         dataType: "json",
                         success: function (data) {
                             // jQuery.map(array, callback) :将一个数组中的元素转换到另一个数组中。
                             //  下面就是把数组["value1", "value2",...]转换为[{value:"value1"}, {value:"value2"},...]                 
                             response($.map(data, function (item) {
                                 return { value: item };
                             }));
                         },
                         error: function () {
                             alert("ajax请求失败");
                         }
                     });
                 }
             });
         });
         </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div style="text-align: left; margin-top: 10px; margin-bottom: 10px;">
            <b>
                <asp:Label ID="lbl_title" runat="server" Text=""></asp:Label>
            </b>
        </div>
        <div style="text-align: left; margin-bottom: 10px; margin-top: 10px;">
            项目编号：
            <asp:TextBox ID="txt_proid" runat="server"></asp:TextBox>
            项目名称：<asp:TextBox ID="txt_proName" runat="server"></asp:TextBox>
            &nbsp;<asp:Button ID="btn_sel" runat="server" OnClick="btn_sel_Click" Text="查询" Width="68px" />
        </div>
        <div style="text-align: center;">
            <asp:GridView ID="GridView1" runat="server" Width="100%" AutoGenerateColumns="False" BorderWidth="0px" CellPadding="0" CellSpacing="1" CssClass="gv" GridLines="None"
                OnRowCommand="GridView1_RowCommand">
                <Columns>
                    <asp:TemplateField HeaderText="选择" Visible="False">
                        <HeaderTemplate>
                            <input id="cbo_checkAll" type="checkbox" onclick="checkall(this)" />全选
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="cbo_check" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbn_check" runat="server" CommandArgument='<%# Bind("proid") %>'
                                CommandName="check">出库和打印出库单</asp:LinkButton>
                            <asp:Label ID="lbl_check_user_id" runat="server" Text='<%# Bind("check_user_id") %>'
                                Visible="False"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="项目编号">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("proid") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lbl_proid" runat="server" Text='<%# Bind("proid") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="projectname" HeaderText="项目名称" />
                </Columns>
                <PagerStyle CssClass="mypager" />
            </asp:GridView>
            &nbsp;</div>
        <div style="text-align: center; margin-top: 10px; margin-bottom: 10px;">
            &nbsp;&nbsp;&nbsp;
        </div>
    </div>
    </form>
</body>
</html>
